<#list pageInfo.list as page>
<div class="f-list ng-scope" ng-repeat="one in result.flights|orderBy:sort.key:sort.type" ng-if="loaded">
    <div class="f-item" ng-attr-id="{{ 'airline-item-' + one.flight_no }}" ng-click="showSubInfo(one)"
         id="airline-item-9C8542">
        <div class="f-item-info ng-scope" ng-if="one.flight_no" style="position: relative">
            <div class="f-line">
                            <span class="airline-logo"><i ng-attr-id="{{ 'logo-item-' + one.flight_no }}"
                                                          id="logo-item-9C8930" class="airline-logo-9C"></i></span>
                <p class="f-name ng-binding">${page.flightName!}<span class="ng-binding"></span>
                </p>
                <p class="sub ng-binding" render-html="list.flightNo">${page.flightNo!}</p>
            </div>
            <div class="f-time">
                <div class="time ng-binding" ng-bind="one.dep_time" render-key="list.depTime"
                     render-fun="beginFly">${(page.startDate?string("HH:mm"))!}
                </div>
                <p class="sub ng-binding" render-html="list.depPort">${(page.startAirport)!}机场</p>
            </div>
            <div class="through">
                <div class="arrow">
                    <div class="v-list-item-line">
                        <div class="line-wrapper">
                            <div class="line-time">${page.countDate!}</div>
                            <div class="line"></div>
                        </div>
                    </div>
                </div>

                <p class="duration ng-binding" ng-bind="one.takingTime"></p>
                <div class="f-pop f-pop-stay">
                    <i class="pop-arrow"></i>
                    <strong>经停</strong>
                    <p>经停城市：<span ng-bind="one.stop_infos.city_name" class="ng-binding"></span></p>
                </div>
            </div>
            <div class="f-time">
                <div class="time ng-binding" ng-bind="one.arr_time" render-key="list.arrTime"
                     render-fun="endFly">${(page.endDate?string("HH:mm"))!}
                </div>
                <p class="sub ng-binding" render-html="list.arrPort">${(page.endAirport)!}机场</p>
            </div>

            <div class="v-list-item-price">
                <div class="v-list-item-price-desc">
                    <div>
                        <span>￥</span>
                    ${(page.price)!}
                    </div>
                    <span style="font-size: 10px;color: #666">日期:${page.startDate?string("yyyy年MM月dd日")}</span>
                </div>

            </div>

            <div class="item item-btn btn_search">
                <a id="btn_search" onclick="btn_search(this)">订购</a>
            </div>

            <script>
                function btn_search(t){
                    var r = confirm("确认是否订购该机票？");
                    if (r == true)
                    {
                        alert("预订成功!");
                    } else
                    {
                        alert("取消预订!");
                    }
                }

               /* /!*订票机票点击事件*!/
                $("#btn_search").on("click", function () {
                    var r = confirm("确认是否订购该机票？");
                    if (r == true)
                    {
                        alert("预订成功!");
                    } else
                    {
                        alert("取消预订!");
                    }
                })*/
            </script>
        </div>
    </div>
</div>
</#list>

<div style="float: right">
    <div style="float: left;" ><span style="line-height:30px"> 共${pageInfo.pages}页 / ${pageInfo.total}条&nbsp;&nbsp;&nbsp;</span></div>
    <div id="pagination" class="jq-pagination" style="display: inline;"></div>
</div>
<script>
    $("#pagination").jqPaginator({
        totalPages: ${pageInfo.pages}||1,
            visiblePages: 5,
            currentPage: ${pageInfo.pageNum}||1,
            prev: '<a class="prev" href="javascript:void(0);">上一页<\/a>',
            next: '<a class="next" href="javascript:void(0);">下一页<\/a>',
            page: '<a href="javascript:void(0);">{{page}}<\/a>',
            last: '<a class="last" href="javascript:void(0);" >尾页<\/a>',
            onPageChange: function(page, type) {
                if(type == 'change'){
                    $("#currentPage").val(page);
                    $("#searchFly").click();
                }

            }
    })
</script>